
import java.util.Scanner;
import java.io.*;
import java.util.Arrays;

public class Test {
    /**
     * 求字符串中最长数字子串
     * https://www.nowcoder.com/practice/bd891093881d4ddf9e56e7cc8416562d?tpId=182&tqId=34785&ru=/exam/oj
     *
     * @param args
     * @throws IOException
     */
    public static void main(String[] args) throws IOException {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        char[] s = br.readLine().toCharArray();

        int begin = 0, len = 0;
        for (int i = 0; i < s.length; i++) {

            if (s[i] >= '0' && s[i] <= '9') {

                int j = i;
                while (j < s.length && s[j] >= '0' && s[j] <= '9') j++;
                if (len < j - i) {
                    begin = i;
                    len = j - i;
                }
                i = j;
            }
        }

        for (int i = begin; i < begin + len; i++) {
            System.out.print(s[i]);
        }
    }


    int[] dx = {0, 0, 1, -1};
    int[] dy = {1, -1, 0, 0};
    boolean[][] flat;

    /**
     * 岛屿个数 1个大陆也是一片岛屿
     * https://www.nowcoder.com/practice/0c9664d1554e466aa107d899418e814e?tpId=196&tqId=37167&ru=/exam/oj
     *
     * @param grid
     * @return
     */
    public int solve(char[][] grid) {
        int n = grid.length;
        int m = grid[0].length;
        flat = new boolean[n][m];

        //递归dps函数
        int num = 0;
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                if (grid[i][j] == '1') {
                    int ret = dps(grid, i, j, n, m);
                    if (ret > 1) num++;
                }

            }
        }
        return num;
    }

    //dps函数的实现
    public int dps(char[][] grid, int i, int j, int n, int m) {

        int count = 1;
        flat[i][j] = true;
        for (int k = 0; k < 4; k++) {
            int x = i + dx[k];
            int y = j + dy[k];

            if (x >= 0 && x < n && y >= 0 && y < m && !flat[x][y] && grid[x][y] == '1') {
                count += dps(grid, x, y, n, m);
            }
        }

        return count;
    }


    /**
     * 拼三角形
     * https://ac.nowcoder.com/acm/problem/219046
     * @param args
     */
    public static void main1(String[] args) {
        Scanner in = new Scanner(System.in);

        int n = in.nextInt();
        int[] tem = new int[6];
        while (n-- != 0) {
            for (int i = 0; i < 6; i++) tem[i] = in.nextInt();

            Arrays.sort(tem);

            //判断4中情况
            if (tem[0] + tem[1] > tem[2] && tem[3] + tem[4] > tem[5]
                    || tem[0] + tem[2] > tem[3] && tem[1] + tem[4] > tem[5]
                    || tem[0] + tem[3] > tem[4] && tem[1] + tem[2] > tem[5]
                    || tem[0] + tem[4] > tem[5] && tem[1] + tem[2] > tem[3]) {
                System.out.println("Yes");
            } else {
                System.out.println("No");
            }
        }
    }
}


